import request from '@/utils/zyrequest'
import qs from 'qs'
import { getToken } from '@/utils/auth'

export default {
    select(pojo) {
        return request({
            url: '/item/productbaseEdition/productbaseEditionList',
            method: 'get',
            params: {
                page: pojo.page,
                size: pojo.size,
                bName: pojo.bName, // 基地名称
                bInputLocation: pojo.bInputLocation, // 基地地址
                medicinalNameEditionForSearch: pojo.mName, //生产药材
                bArea: pojo.bArea, // 基地面积
                bProvinceSeek: pojo.bProvinceSeek, // 省
                bCitySeek: pojo.bCitySeek, //市
                bRegionSeek: pojo.bRegionSeek, //区
                eTime: pojo.eTime
            },
            headers: {
                'token': getToken()
            }
        })
    },

    // 查询基地照片
    selectImgsList(pojo) {
        return request({
            url: '/item/productbaseEdition/productEditionImg',
            method: 'get',
            params: {
                tProductbaseId: pojo.tProductbaseId,
                eTime: pojo.eTime
            },
            headers: {
                'token': getToken()
            }
        })
    },

    // 获取药材下拉列表
    selectMedicinalList(eTime) {
        return request({
            url: '/item/productbaseEdition/getMedicinalNamesEdition',
            method: 'get',
            params: {
                eTime: `${eTime}`
            },
            headers: {
                'token': getToken()
            }
        })
    }

}